<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      margin: 0;
      padding: 0;

      /* inline-level box */
      /* 行内级: 行内非替换元素span/a 行内替换元素 img input inline-block */
      /* text-align: center;*/
    }

    .container {
      width: 800px;
      height: 150px;
      background-color: #0f0;
    }

    .box {
      width: 100px;
      height: 100px;
      background-color: #f00;

      margin: 0 auto;
    }
  </style>
</head>
<body>
<!--  <spnan>hello</span>-->
<!--  <a href="https://www.baidu.com">百度</a>-->
<!--<input type="text" value="aaaa">-->
<!--    <img src="https://www.baidu.com/favicon.ico" alt="">-->

  <div class="container">
    <div class="box"></div>
  </div>

</body>
</html>